import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';

// import { ErrorComponent } from './error/error.component';
import {Page01Component} from './page01/page01.component'
import {Page02Component} from './page02/page02.component';

import {P2C1Component} from './page02/p2-c1/p2-c1.component';
import {P2C2Component} from './page02/p2-c2/p2-c2.component';
import { TemplateRefComponent } from './pages/template-ref/template-ref.component'
import { DirectiveComponent } from './pages/directive/directive.component'
import { NgTemplateOutletComponent } from './pages/ng-template-outlet/ng-template-outlet.component'
import { ComponentComminicationComponent } from './pages/component-comminication/component-comminication.component';
import { InheritComponent } from './pages/inherit/inherit.component'
import { DecoratorsComponent } from './pages/decorators/decorators.component'
import { ViewchildComponent } from './pages/viewchild/viewchild.component';

export const routes: Routes = [
	{
		path: '',
		// component:LoginComponent,
		redirectTo: 'page01',pathMatch: 'full'
    },
    {
        path:'page01',
        component:Page01Component
    },
    {
        path:'page02',
        component:Page02Component,
        children: [
          { path: 'c1', component: P2C1Component },
          { path: 'c2', component: P2C2Component }
        ]
    },
    {
        path:'templateRef',
        component:TemplateRefComponent
    },
    {
        path:'directives',
        component:DirectiveComponent
    },
    {
        path:'NgTemplateOutletComponent',
        component:NgTemplateOutletComponent
    },
    {
        path:'com_communication',
        component:ComponentComminicationComponent
    },
    {
        path:'inherit',
        component:InheritComponent
    },
    {
        path:'Decorators',
        component:DecoratorsComponent
    },
    {
        path:'Viewchild',
        component:ViewchildComponent
    },
	

	
];



@NgModule({
  imports: [RouterModule.forRoot(routes, { useHash: true })],
  exports: [RouterModule],
})
export class AppRoutesModule { }
